contract SomeContract {
function someOtherFunction() public pure returns (uint){
uint32 y = 10;
uint16 z = 12;
uint8 x = y + z;
return x;
}
}
A. No issues at all. The code would compile and run successfully
B. Compilation error as type uint32 is not implicitly convertible to
uint8
C. Code would have issues in getting deployed
D. None of these
Q109: What would be the issue in the following code?
// SPDX-License-Identifier: SOME IDENTIFIER
pragma solidity ^0.8.10;
interface SomeInterface {
function someFunction() external pure returns(string
memory);
}
contract ImplementorContract is SomeInterface {
function someFunction() public override pure returns(string
memory) {
return “some message”;
}
function someOtherFunction() public returns (string memory){
SomeInterface a = new SomeInterface();
return “Some other message”;
}
}
A. No issues at all. The code would compile and run successfully